<template>
  <div>
    <CategorySelector :disabled="isShow !== 1" />
    <SpuList v-if="isShow === 1" @updateShow="updateShow" />
    <AddSpu v-if="isShow === 2" @updateShow="updateShow" />
    <AddSku v-if="isShow === 3" @updateShow="updateShow" />
  </div>
</template>

<script>
import CategorySelector from '@/components/CategorySelector'
import SpuList from './spuList'
import AddSpu from './addSpu'
import AddSku from './addSku'
export default {
  name: 'Spu',
  components: {
    CategorySelector,
    SpuList,
    AddSpu,
    AddSku
  },
  data() {
    return {
      // 1.SPU列表 2.新增SPU 3.新增SKU
      isShow: 1
    }
  },
  methods: {
    updateShow(val) {
      this.isShow = val
    }
  }
}
</script>

<style></style>
